home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR09 / TRUCKER.ZIP / TRUCKER.CMD
OS/2 REXX Batch file  |  1993-02-28  |  60KB  |  1,773 lines

  1. /* REXX */
  2. /* ---------------------------------------------------------------------
  3. TRUCKER in REXX                                        February 28, 1993
  4. ------------------------------------------------------------------------
  5. This is a game program, originally written in BASIC by Hughes Glantzberg
  6. from Irving, Texas.
  7.  
  8. This version has been created based on the above program by Simon Husin
  9. to show REXX program's flexibility and portability.  This program is NOT
  10. created for COMMERCIAL purposes.  Commercial use of the materials in
  11. this program requires permissions of Mr. Glantzberg and/or Mr. Husin.
  12.  
  13. TRUCKER in REXX has been tested to run problem-free on MVS/TSO, Unix,
  14. OS/2, DOS, DOS/Windows, and Amiga platforms.  For compatibility and
  15. other matters please see notes at the end of this program.
  16.  
  17. Following the Main Program, the functions and subroutines in this
  18. program are placed in the order of their names.
  19. --------------------------------------------------------------------- */
  20. /*
  21. Main Program
  22. ============
  23. */
  24. /*
  25. Start Main Program Initialization
  26. */
  27. call time 'R'         /* Reset the elapse time for the entire program */
  28. parse source shenv .
  29. queue shenv
  30. drop shenv
  31. /*
  32. End of Main Program Initialization
  33. */
  34. call initial_environment
  35. do while sh_keep_on_trucking
  36.    call ride_cross_country
  37.    end
  38. say ' '
  39. say 'End Of Game...'
  40. say 'Thank you for playing T.R.U.C.K.E.R.'
  41. exit
  42. /* ------------------------------<End>------------------------------ */
  43. /*
  44. Subroutine to check obstacles or hindrance on the road
  45. ======================================================
  46. */
  47. check_obstacles:
  48. say 'You have just passed 'mpX.rt.np
  49. zh = zm.rt.np
  50. sl = 55
  51. intzh = zh % 1
  52. select
  53.    when intzh = 1 then do
  54.         say 'Time zone changes -- set clock ahead one hour.'
  55.         hr = hr + 1
  56.         call report_trip_duration hr
  57.         end
  58.    when intzh = 2 then do
  59.         t = 100 * (zh - intzh) % 1
  60.         if t > 0 then do
  61.            say 'STOP!   Pay toll of $'t
  62.            xc = xc + t
  63.            end
  64.         end
  65.    when intzh = 3 then do
  66.         if rnd() >= zh - intzh then do
  67.            say 'Construction ahead !!'
  68.            call delay 150
  69.            say 'Slow down -- speed limit 35 MPH'
  70.            sl = 35
  71.            end
  72.         end
  73.    when intzh = 4 then do
  74.         if rnd() >= zh - intzh then do
  75.            t = sp + rnd() * 5 % 1 - 2
  76.            say 'You were just clocked by radar at 't'MPH.'
  77.            if t > sl + 3 then do
  78.               call got_caught_by_police
  79.               if sh_keep_on_trucking then
  80.                  nop
  81.               else
  82.                  return
  83.               end
  84.            else
  85.               say '     No ticket this time.'
  86.            end
  87.         end
  88.    when intzh = 5 then do
  89.         if zh = intzh &,
  90.            rnd() >= 0.5 |,
  91.            (zh < intzh | zh > intzh) &,
  92.            rnd() < zh - intzh then
  93.            nop
  94.         else do
  95.            say 'Weighing station open -- trucks must stop.'
  96.            call delay 150
  97.            say 'Scale weighs truck with cargo, fuel & driver: '
  98.            t = (19000 + wl + 7 * wf + 25 * rnd() * 10) % 1
  99.            say t' pounds.'
  100.            t = t - 68000 % 1  /* limit was 60000 */
  101.            if t < 1 then
  102.               say "     You're O.K."
  103.            else if zh = 5 then do
  104.               say 'You are not allowed to enter Louisiana with that',
  105.                   'load.'
  106.               say '     Take a 200 mile detour through Arkansas',
  107.                   'with 45 MPH limit.'
  108.               sl = 45
  109.               mrX.rt.np = 'Arkansas country roads'
  110.               do i = 12 to 25
  111.                  mp.rt.i = mp.rt.i + 200
  112.                  end
  113.               mt.rt = mt.rt + 200
  114.               end
  115.            else do
  116.               t1 = (rnd() * 4 + 2) % 1
  117.            say '     Overweight fine is $200.00 plus 't1' cents/pound.'
  118.               xc = xc + 200 + (t * t1) / 100
  119.               say 'Pay fine of $'200 + (t * t1) / 100
  120.               end
  121.            end
  122.         end
  123.    when intzh = 6 then do
  124.         if rnd() >= zh - intzh then do
  125.            t = (rnd() * 6) % 1
  126.            say 'A rock slide has blocked the Alleghany Tunnel',
  127.                'entrance.'
  128.            say '     THE HIGHWAY DEPARTMENT WILL HAVE IT',
  129.                'CLEARED IN 'T' HOURS.'
  130.            hr = hr + t
  131.            call delay 150
  132.            hsw1 = 1
  133.            if ct = 1 then do
  134.               wf = wf - 7 * t
  135.               if wf <= 1 then do
  136.                  say '     You ran out of gas while waiting...'
  137.                  t = 0
  138.                  call wait_for_gas
  139.                  hsw1 = 0
  140.                  end
  141.               end
  142.            if hsw1 then do
  143.               if t > 1 then
  144.                  t1 = (t / 2 + 0.5) % 1
  145.               else
  146.                  t1 = 0
  147.               if t1 > 3 then
  148.                  hl = 0
  149.               else if t1 > 0 then
  150.                  hl = hl / 2
  151.               hs = hs + t1
  152.               say '     While waiting, you got 't1' hours of sleep...'
  153.               call report_trip_duration hr
  154.               end
  155.            end
  156.         end
  157.    when intzh = 7 then do
  158.         if ct = 1 &,
  159.            rnd() >= zh - intzh then do
  160.            say 'The trailer refrigeration unit has failed endangering',
  161.                'the cargo.'
  162.            say '     Repairs take 2 hours and cost $100.00.'
  163.            cx = cx + rnd() * 5 % 1
  164.            hl = hl + 2
  165.            hr = hr + 2
  166.            xc = xc + 100
  167.            call report_trip_duration hr
  168.            call delay 400
  169.            end
  170.         end
  171.    when intzh = 8 then
  172.         call end_of_trip
  173.    otherwise
  174.         nop
  175.    end
  176. np = np + 1
  177. call delay 150
  178. return
  179. /* ------------------------------<End>------------------------------ */
  180. /*
  181. Subroutine to check operating system environment and initial system
  182. specific commands for local system interpret(ation)
  183. ===================================================================
  184. */
  185. check_operating_system: procedure expose rxbeep rxcls rxenv rxext rxpull
  186. parse version interpreter version release
  187. addr = address()
  188. parse pull env
  189. /* parse source env . */
  190. rxenv = env' @ 'addr'  Running:'interpreter'  Ver/Rel:'version'/'release
  191. rxext = "say center('Press Enter to start the game...', 79)"
  192. interpreter = translate(interpreter)
  193. addr = translate(addr)
  194.  
  195. select
  196.    when interpreter = 'REXX370' then do
  197.                     /* Welcome to the IBM Mainframe */
  198.         select
  199.            when addr = 'MVS' then do            /* MVS */
  200.                 say 'Sorry!'
  201.                 say 'This program is not intended to be used in the'
  202.                 say 'MVS Batch (IRXJCL) environment.'
  203.                 exit 10
  204.                 end
  205.            when addr = 'TSO' then do            /* TSO/E */
  206.                 if strip(sysvar('sysenv')) = 'FORE' then do
  207.                    rxcls = "'clrscrn'"
  208.                    rxbeep = 'nop'
  209.                    rxpull = 'pull shstr'
  210.                    end
  211.                 else do
  212.                    say 'Sorry!'
  213.                    say 'This program is not intended to be used in the'
  214.                    say 'TSO Batch (IKJEFT01) environment.'
  215.                    exit 20
  216.                    end
  217.                 end
  218.            otherwise                            /* VM/CMS */
  219.                 rxcls = 'clear'
  220.                 rxbeep = 'nop'
  221.                 rxpull = 'pull shstr'
  222.            end
  223.         end
  224.  
  225.    when interpreter = 'UNI-REXX' then do
  226.                     /* Welcome to a Unix/AIX Workstation */
  227.                     /* The Workstation Group (wrk/grp) uni-REXX */
  228.         rxcls = "'clear'"
  229.         rxbeep = "'echo "d2c(7)"'"  /* ANSI ESC seq. char. (BELL) */
  230.         rxpull = 'pull shstr'
  231.         end
  232.  
  233.    when interpreter = 'REXXSAA' then do
  234.                     /* Welcome to the IBM PL 2/REXX */
  235.         if addr \= 'CMD' then     /* To avoid problems when run under */
  236.            exit 30                /* an unknown environment */
  237.  
  238.         rxbeep = 'result = beep(shf, shd * 1.5 % 1)'
  239.         rxcls = "'cls'"
  240.         say '1B'x || '[1;36;44m'  /* ESC[36;44m light cyan on blue */
  241.         if word(release, 3) < 1992 then do
  242.            'echo off'
  243.            rxpull = 'shstr = translate(linein(con))'
  244.            rxenv = rxenv '(16-bit)'
  245.            end
  246.         else do
  247.            '@echo off'
  248.            call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  249.            call sysloadfuncs
  250.            rxpull = 'pull shstr'
  251.            rxenv = rxenv '(32-bit)'
  252.            rxext = 'call truckos2'
  253.            end
  254.         end
  255.  
  256.    when interpreter = 'REXX/PERSONAL' then do
  257.                     /* Welcome to the Quercus Systems REXX world */
  258.         if addr = 'CMD' then do                 /* under OS/2 */
  259.            say '1B'x || '[1;36;44m'  /* ESC[36;44m light cyan on blue */
  260.            rxcls = 'result = scrwrite(1,1,,2000,,27) cursor(1,1)'
  261.            rxbeep = 'result = sound(shf, shd / 700)' /* or beep */
  262.            rxpull = 'pull shstr'
  263.            if version <= 2 then
  264.               rxenv = rxenv '(16-bit)'
  265.            else
  266.               rxenv = rxenv '(32-bit)'
  267.            rxext = 'call truckper'
  268.            end
  269.         else if addr = 'DOS' then do            /* under PC/MS-DOS */
  270.            rxcls = 'result = scrwrite(1,1,,2000,,27) cursor(1,1)'
  271.            rxbeep = 'result = sound(shf, shd / 700)' /* or beep */
  272.            rxpull = 'pull shstr'
  273.            rxext = 'call truckper'
  274.            end
  275.         else if addr = 'WINREXX' then do        /* under MS-Windows or
  276.                                                    IBM WinOS2 */
  277.            rxcls = "'cls'"
  278.            rxbeep = 'result = sound(shf, shd / 700)' /* or beep */
  279.            rxpull = 'pull shstr'
  280.            end
  281.         else do                                 /* unknown env. */
  282.            rxcls = "do 25;say ' ';end"
  283.            rxbeep = 'result = sound(shf, shd / 700)' /* assumed! */
  284.            rxpull = 'pull shstr'
  285.            end
  286.         end
  287.  
  288.    when left(interpreter, 9) = 'REXX-KILO' then do /* PC/MS-DOS */
  289.                     /* Welcome to the Kilowatt Software Portable/REXX */
  290.         rxcls = "'cls'"
  291.         rxbeep = 'result = tone(shf, shd / 700)'
  292.         rxpull = 'pull shstr'
  293.         rxext = 'call truckpor'
  294.         end
  295.  
  296.    when left(interpreter, 9) = 'REXX/WIND' then do /* Windows/Win-OS2 */
  297.                     /* Welcome to the Kilowatt Software REXX/Windows */
  298.         rxcls = "'cls'"
  299.         rxbeep = 'result = tone(shf, shd / 700)'
  300.         rxpull = 'pull shstr'
  301.         end
  302.  
  303.    when interpreter = 'REXX/PC' then do
  304.                     /* Welcome to the Tritus REXX under DOS TSPF */
  305.         rxcls = "'cls'"
  306.         rxbeep = 'nop'
  307.         rxpull = 'pull shstr'
  308.         end
  309.  
  310.    when interpreter = 'AREXX' then do
  311.                     /* Welcome to the Amiga Micro Computer w/ ARexx */
  312.         rxcls = "result = writech('STDOUT', '1B'x" || '"[2J")'
  313.                                       /* ANSI ESC seq. char. (CLS) */
  314.         rxbeep = "result = writech('STDOUT', '07'x)"
  315.                                       /* ANSI ESC seq. char. (BELL) */
  316.         rxpull = 'pull shstr'
  317.         end
  318.  
  319.    otherwise
  320.                     /* Welcome to ... computer environment */
  321.         rxcls = 'nop'   /* with your ... REXX interpreter/compiler */
  322.         rxbeep = 'nop'
  323.         rxpull = 'pull shstr'
  324.    end
  325. interpret rxcls
  326. return
  327. /* ------------------------------<End>------------------------------ */
  328. /*
  329. Subroutine to check the mood & physical condition of the trucker
  330. ================================================================
  331. */
  332. check_trucker_condition:
  333. if hl > 19 |,
  334.    hr / hs > 4 then do
  335.    cd = 100
  336.    cdX = '..E.X.H.A.U.S.T.E.D..'
  337.    end
  338. else if hl < 4 &,
  339.    cos(hr / (hs * 1.819)) > 0 then do
  340.    cd = 1
  341.    cdX = 'rested & rearing to go.'
  342.    end
  343. else if hl < 8 &,
  344.    cos(hr / (hs * 1.892)) > 0 then do
  345.    cd = 2
  346.    cdX = 'fine'
  347.    end
  348. else if hl < 12 &,
  349.    hr / hs <= 3 then do
  350.    cd = 4
  351.    cdX = '  b o r e d'
  352.    end
  353. else if hl < 16 &,
  354.    hr / hs <= 3 then do
  355.    cd = 8
  356.    cdX = '  t i r e d  !!'
  357.    end
  358. else do
  359.    cd = 25
  360.    cdX = "fatigued...you're getting sleepy"
  361.    end
  362. return
  363. /* ------------------------------<End>------------------------------ */
  364. /*
  365. Subroutine to check the weather and driving condition and report its
  366. description
  367. ====================================================================
  368. */
  369. check_weather:
  370. af = (3000 + mf) * rnd()
  371. crX = 'clear & dry'
  372. select
  373.    when rt = 0 then do
  374.       if af < 3400 &,
  375.          (cr < 50 | cr > 50) then
  376.          cr = 1
  377.       else if af > 4900 then do
  378.          cr = 50
  379.          crX = 'B-L-I-Z-Z-A-R-D  !!'
  380.          end
  381.       else if af > 4700 then do
  382.          cr = 10
  383.          crX = 'fog -- limited visibility'
  384.          end
  385.       else if af > 4200 then do
  386.          cr = 5
  387.          if (rnd() * 3) % 1 + 1 = 1 then
  388.             crX = 'light snow'
  389.          else
  390.             crX = 'rain'
  391.          end
  392.       else do
  393.          cr = 3
  394.          crX = 'clear, but roadway is wet'
  395.          end
  396.       end
  397.    when rt = 1 then do
  398.       if af < 3300 &,
  399.          (cr < 50 | cr > 50) then
  400.          cr = 1
  401.       else if af > 4800 then do
  402.          cr = 50
  403.          crX = 'B-L-I-Z-Z-A-R-D  !!'
  404.          end
  405.       else if af > 4600 then do
  406.          cr = 10
  407.          crX = 'fog -- limited visibility'
  408.          end
  409.       else if af > 3800 then do
  410.          cr = 5
  411.          crX = 'light snow'
  412.          end
  413.       else do
  414.          cr = 3
  415.          crX = 'clear, but roadway is wet'
  416.          end
  417.       end
  418.    otherwise do
  419.       if af < 4000 &,
  420.          (cr < 50 | cr > 50) then
  421.          cr = 1
  422.       else if af > 5700 then do
  423.          cr = 50
  424.          crX = 'B-L-I-Z-Z-A-R-D  !!'
  425.          end
  426.       else if af > 5500 then do
  427.          cr = 10
  428.          crX = 'fog -- limited visibility'
  429.          end
  430.       else if af > 4400 then do
  431.          cr = 5
  432.          crX = 'rain'
  433.          end
  434.       else do
  435.          cr = 3
  436.          crX = 'clear, but roadway is wet'
  437.          end
  438.       end
  439.    end
  440. return
  441. /* ------------------------------<End>------------------------------ */
  442. /*
  443. Function to calculate the COSine of the argument X (in Radians)
  444. ===============================================================
  445. According to algorithm: cos(x) = 1 - x**2/2! + x**4/4! - x**6/6! + ...
  446. */
  447. cos: procedure
  448. arg rad .
  449.  
  450. serrad = 1
  451. serfactn = 0
  452. serfact = 1
  453. plusmin = 1
  454. radquad = rad * rad
  455. cosine = 1
  456.  
  457. do digits()
  458.    serrad = serrad * radquad
  459.  
  460.    serfactn = serfactn + 2
  461.    serfact = serfact * (serfactn - 1) * serfactn
  462.  
  463.    plusmin = 0 - plusmin
  464.    serprec = serrad / serfact * plusmin
  465.  
  466.    if serprec = 0 then
  467.       leave
  468.    cosine = cosine + serprec
  469.    end
  470.  
  471. return cosine
  472. /* ------------------------------<End>------------------------------ */
  473. /*
  474. Subroutine to delay processing for parameter 'timeout' hundredths
  475. of a second
  476. =================================================================
  477. */
  478. delay: procedure
  479. arg timeout
  480. if timeout < 0.5 then
  481.    return
  482. call time 'R'       /* Reset the elapse time for this subroutine only */
  483. hsec = (timeout + 0.5) / 100
  484. do until hsec <= time('E')
  485.    end
  486. return
  487. /* ------------------------------<End>------------------------------ */
  488. /*
  489. Subroutine to handle the arrival at destination
  490. ===============================================
  491. */
  492. end_of_trip:
  493. interpret rxcls
  494. say ' '
  495. say center('WELCOME', 79)
  496. call delay 100
  497. say center('TO', 79)
  498. call delay 100
  499. say center('NEW YORK', 79)
  500. call delay 250
  501. call report_trip_duration hr
  502. t = hr - (hr % 24)
  503. if t < 10 &,
  504.    t > 21 then do
  505.    say 'The warehouse is closed...'
  506.    if t < 10 then
  507.       t = 10 - t
  508.    else
  509.       t = 34 - t
  510.    say 'Wait 'formatsim(t, 3)' hours until it opens...'
  511.    call delay 500
  512.    hr = hr + t
  513.    call report_trip_duration hr
  514.    end
  515. say ' '
  516. t = (hr / 24) % 1
  517. t1 = hr - 24 * t
  518. if t1 > 1 then
  519.    say 'You completed the trip in 't' days and 't1' hours.'
  520. else
  521.    say 'You completed the trip in 't' days.'
  522. say '     Trip expenses totaled $'xc
  523. t1 = 85 * t + 85
  524. say '     Truck payment, insurance and taxes cost $'t1
  525. xc = xc + t1
  526. xt = 0
  527. say ' '
  528. if ct = 1 then do
  529.    t1 = (t - 4) * (rnd() * 3) % 1
  530.    if t1 > 0 then
  531.       cx = cx + t1
  532.    if cx > 6 then
  533.       say 'Your oranges have spoiled.  Haul them to the dump!'
  534.    else do
  535.       say 'Collect six-and-a-half cents per pound for good oranges.'
  536.       xt = 0.065 * wl
  537.       say '     Total for the load: $'xt
  538.       if cx >= 1 then do
  539.          say '     Part of the load is damaged. Subtract '5 * cx'%.'
  540.          xt = xt - xt * cx / 20
  541.          say '     Net payment is $'xt
  542.          end
  543.       end
  544.    end
  545. else if ct = 2 then do
  546.    xt = 0.05 * wl
  547.    say 'Collect five cents a pound for freight.'
  548.    say '     Total for load is $'xt
  549.    if hr >= 95 then do
  550.       say "     You're late!!  Subtract ten percent penalty."
  551.       xt = xt * 0.9
  552.       say '     Net payment is $'xt
  553.       end
  554.    end
  555. else do
  556.    say 'Postmaster pays 4.75 cents per pound on delivery.'
  557.    xt = 0.0475 * wl
  558.    end
  559. say ' '
  560. xt = xt - xc
  561. if xt >= 0 then do
  562.    say 'Your net profit this trip was $'xt
  563.    if xt > 100 then
  564.       say '     G O O D   W O R K  !!'
  565.    if xt < 200 then
  566.       say "     You'd make more money washing dishes !"
  567.    sh_keep_on_trucking = 0
  568.    end
  569. else do
  570.    say 'Bad trip. . . You lost $'abs(xt)
  571.    say 'You are bankrupt !!!'
  572.    call delay 200
  573.    call give_up_truck
  574.    end
  575. return
  576. /* ------------------------------<End>------------------------------ */
  577. /*
  578. Function to return a specified number of digits before the decimal point
  579. ========================================================================
  580. */
  581. formatsim:
  582. arg number, before
  583. shdigits = digits()
  584. numeric digits before
  585. shformattemp = number + 0
  586. numeric digits shdigits
  587. return shformattemp
  588. /* ------------------------------<End>------------------------------ */
  589. /*
  590. Subroutine to request a numeric string from the console/keyboard
  591. ================================================================
  592. */
  593. getnum: procedure expose rxenv rxpull
  594. do forever
  595.    shnum = space(translate(getstr(), '', ','), 0)
  596.    if datatype(shnum, 'N') then
  597.       leave
  598.    end
  599. return shnum
  600. /* ------------------------------<End>------------------------------ */
  601. /*
  602. Subroutine to request a string of characters from the console/keyboard
  603. ======================================================================
  604. */
  605. getstr: procedure expose rxenv rxpull
  606. shstr = ''
  607. interpret rxpull
  608. if shstr = '*' then do          /* allow user to exit at any time
  609.                                    by entering '*' at any prompt  */
  610.    say 'Thank you for playing Trucker under...'
  611.    say rxenv
  612.    exit 0
  613.    end
  614. return shstr
  615. /* ------------------------------<End>------------------------------ */
  616. /*
  617. Subroutine to send a very sad message to the trucker...
  618. =======================================================
  619. */
  620. give_up_truck: procedure expose sh_keep_on_trucking
  621. say ' '
  622. say 'Your rig has been repossessed...'
  623. call delay 250
  624. sh_keep_on_trucking = 0
  625. return
  626. /* ------------------------------<End>------------------------------ */
  627. /*
  628. Subroutine to handle 'paper' work, i.e. financial, time and some other
  629. more serious issues with the police for traffic violation
  630. ======================================================================
  631. */
  632. got_caught_by_police:
  633. say 'Smokey is behind you with his lights on.  Pull over!'
  634. shd = 400
  635. do 3
  636.    shf = 3000
  637.    interpret rxbeep
  638.    shf = 2500
  639.    interpret rxbeep
  640.    end
  641. nt = nt + 1
  642. say 'See the justice of the peace for your 'ntX.nt' offense.'
  643. say '     Wait 'nt' hours for your hearing...'
  644. hl = hl + nt
  645. hr = hr + nt
  646. if nt <= 3 then do
  647.    t = (nt * (rnd() * 5)) % 1
  648.    t1 = (5 * (rt + nt * (rnd() * 4))) % 1
  649.    say '     The fine is $'t1' plus $'t' for each MPH over the limit.'
  650.    say '     Pay $'t1 + t * (sp - sl)
  651.    xc = xc + t1 + t * (sp - sl)
  652.    call delay (nt * 500)
  653.    return
  654. end
  655. say 'You are sentenced to 30 days in jail for reckless driving.'
  656. call delay 300
  657. say "Your I.C.C. driver's license is revoked !"
  658. call give_up_truck
  659. return
  660. /* ------------------------------<End>------------------------------ */
  661. /*
  662. Subroutine to process flat tire problem
  663. =======================================
  664. */
  665. got_flat_tire:
  666. shf = 3000
  667. shd = 100
  668. interpret rxbeep
  669. do shw = 200 to 100 by - 50
  670.    shf = shw
  671.    shd = (200 / shf * 500) % 1
  672.    interpret rxbeep
  673.    shf = shw / 2
  674.    interpret rxbeep
  675.    end
  676. say 'You just blew a tire !!'
  677. if ts <= 0 then do
  678.    say 'Since your spare has already been used, you have to call a tow'
  679.    say 'truck'
  680.    say 'from town to deliver a new tire for you.'
  681.    say '     This service cost $400.00 and took 4 hours.'
  682.    hl = hl + 4
  683.    hr = hr + 4
  684.    xc = xc + 400
  685.    end
  686. else do
  687.    ts = ts - 1
  688.    if ts < 0 then
  689.       ts = 0
  690.    tc = tc - 2 * ts
  691.    t = (rnd() * 2) % 1 + 1
  692.    if t = 1 then
  693.       tX = 'outside'
  694.    else
  695.       tX = 'inside'
  696.    say '     It took 't' hours to change the 'tX' tire.'
  697.    hl = hl + t + 1
  698.    hr = hr + t + 1
  699.    end
  700. call delay 750
  701. return
  702. /* ------------------------------<End>------------------------------ */
  703. /*
  704. Subroutine to show title, request for game parameters and initial
  705. work variables
  706. =================================================================
  707. */
  708. initial_environment:
  709. call check_operating_system
  710. call showtitl
  711. cx = 0
  712. hl = 3
  713. hr = 0
  714. hs = 7
  715. mf = 0
  716. np = 1
  717. ns = 0
  718. nt = 0
  719. sl = 55
  720. tc = 10
  721. ts = 1
  722. wf = 190
  723. xc = 190
  724. ntX.1 = 'first'
  725. ntX.2 = 'second'
  726. ntX.3 = 'third'
  727. ntX.4 = 'fourth'
  728. dsX.0 = 'Monday'
  729. dsX.1 = 'Tuesday'
  730. dsX.2 = 'Wednesday'
  731. dsX.3 = 'Thursday'
  732. dsX.4 = 'Friday'
  733. dsX.5 = 'Saturday'
  734. dsX.6 = 'Sunday'
  735. sh_keep_on_trucking = 1   /* switch, 0 = end of loop */
  736. call delay 100
  737. interpret rxext
  738. call getstr
  739. interpret rxcls
  740. call report_trip_duration hr
  741. say 'You are at the Los Angeles trucking terminal.'
  742. say 'Three types of cargo are available:'
  743. say ' '
  744. say "     1--Oranges (highest profit if they don't spoil)"
  745. say '     2--Freight forwarding (penalty for late delivery)'
  746. say '     3--U.S. Mail (lowest rate, but no hurry to arrive)'
  747. say ' '
  748. say 'The cargo is due in New York by 4 PM on Thursday.'
  749. say ' '
  750. say 'Which type of cargo do you want (1, 2 or 3)?'
  751. do forever
  752.    ct = getstr()
  753.    if length(ct) = 1 & pos(ct, '123') > 0 then
  754.       leave
  755.    end
  756. wl = 0
  757. do while wl < 25000
  758.    say 'How many pounds will you carry (40,000 is the legal limit)?'
  759.    wl = getnum()
  760.    if wl < 25000 then
  761.       say "You can't make a living on half a load."
  762.    end
  763. say ' '
  764. say '     They are loading your truck now.'
  765. call delay (wl % 100)
  766. if wl > 50000 then do
  767.    wl = 50000
  768.    say '     50,000 pounds of cargo has filled your trailer!'
  769.    call delay 250
  770.    end
  771. interpret rxcls
  772. hr = hr + 1
  773. call report_trip_duration hr
  774. say 'You paid $190.00 for a nearly full tank of diesel fuel.'
  775. say ' '
  776. say 'Two of your tires are worn.  Do you want replacements (Y or N)?'
  777. do forever
  778.    ikeyX = getstr()
  779.    if length(ikeyX) = 1 & pos(ikeyX, 'NY') > 0 then
  780.       leave
  781.    end
  782. if ikeyX = 'Y' then do
  783.    say 'A new tire costs $200.00.  A retread costs $100.00.'
  784.    say '     Which type do you want (N=new or R=retread)?'
  785.    do forever
  786.       zX = getstr()
  787.       if length(zX) = 1 & pos(zX, 'NR') > 0 then
  788.          leave
  789.       end
  790.    say '     How many (0-3)?'
  791.    do forever
  792.       tno = getstr()
  793.       if length(tno) = 1 & pos(tno,  '0123') > 0 then
  794.          leave
  795.       end
  796.    if tno > 0 then do
  797.       ts = ts + tno - 2
  798.       if zX = 'R' then do
  799.          tc = tc - 1.5 * tno
  800.          xc = xc + 100 * tno
  801.          end
  802.       else do
  803.          tc = tc - 2 * tno
  804.          xc = xc + 200 * tno
  805.          end
  806.       end
  807.    end
  808. say ' '
  809. say 'You may choose the N(orthern), M(iddle) or S(outhern) route.'
  810. say '     Which route do you choose (N, M or S)?'
  811. do forever
  812.    ikeyX = getstr()
  813.    if length(ikeyX) = 1 & pos(ikeyX, 'MNS') > 0 then
  814.       leave
  815.    end
  816. say ' '
  817. if ikeyX = 'N' then do
  818.    rt = 1
  819.    rh = 4
  820.    mt.1 = 2710
  821.    mp.1.1  =   90; mpX.1.1  = 'Barstow';
  822.      mrX.1.1  = 'I-15 in California';    zm.1.1  = 7.80
  823.    mp.1.2  =  245; mpX.1.2  = 'Las Vegas';
  824.      mrX.1.2  = 'I-15 in California';    zm.1.2  = 1.00
  825.    mp.1.3  =  365; mpX.1.3  = 'Utah border';
  826.      mrX.1.3  = 'I-15 in Arizona';       zm.1.3  = 0.00
  827.    mp.1.4  =  500; mpX.1.4  = 'End of Interstate';
  828.      mrX.1.4  = 'I-15 in Utah';          zm.1.4  = 3.20
  829.    mp.1.5  =  555; mpX.1.5  = 'Salina';
  830.      mrX.1.5  = 'US-89 in Utah';         zm.1.5  = 4.50
  831.    mp.1.6  =  760; mpX.1.6  = 'Grand Junction';
  832.      mrX.1.6  = 'I-70 in Utah';          zm.1.6  = 5.40
  833.    mp.1.7  = 1010; mpX.1.7  = 'Denver';
  834.      mrX.1.7  = 'I-70 in Colorado';      zm.1.7  = 3.75
  835.    mp.1.8  = 1190; mpX.1.8  = 'Nebraska border';
  836.      mrX.1.8  = 'I-76 in Colorado';      zm.1.8  = 1.00
  837.    mp.1.9  = 1450; mpX.1.9  = 'Omaha';
  838.      mrX.1.9  = 'I-80 in Nebraska';      zm.1.9  = 5.50
  839.    mp.1.10 = 1590; mpX.1.10 = 'Demoines';
  840.      mrX.1.10 = 'I-80 in Iowa';          zm.1.10 = 4.75
  841.    mp.1.11 = 1750; mpX.1.11 = 'Illinois border';
  842.      mrX.1.11 = 'I-80 in Iowa';          zm.1.11 = 5.60
  843.    mp.1.12 = 1910; mpX.1.12 = 'Gary';
  844.      mrX.1.12 = 'I-80 in Illinois';      zm.1.12 = 2.50
  845.    mp.1.13 = 2050; mpX.1.13 = 'Ohio border';
  846.      mrX.1.13 = 'Indianna Turnpike';     zm.1.13 = 2.45
  847.    mp.1.14 = 2215; mpX.1.14 = 'Cleveland';
  848.      mrX.1.14 = 'Ohio Turnpike';         zm.1.14 = 2.80
  849.    mp.1.15 = 2280; mpX.1.15 = 'Pennsylvania border';
  850.      mrX.1.15 = 'I-80 in Ohio';          zm.1.15 = 4.16
  851.    mp.1.16 = 2615; mpX.1.16 = 'East Stroudsberg';
  852.      mrX.1.16 = 'I-80 in Pennsylvania';  zm.1.16 = 3.33
  853.    mp.1.17 = 2675; mpX.1.17 = 'Washington Bridge';
  854.      mrX.1.17 = 'I-80 in New Jersey';    zm.1.17 = 2.20
  855.    mp.1.18 = 9999; mpX.1.18 = 'New York';
  856.      mrX.1.18 = 'city streets';          zm.1.18 = 8.00
  857.    end
  858. else if ikeyX = 'M' then do
  859.    rt = 0
  860.    rh = 2
  861.    mt.0 = 2850
  862.    mp.0.1  =  90;  mpX.0.1  = 'Barstow';
  863.      mrX.0.1  = 'I-15 in California';    zm.0.1  = 7.80
  864.    mp.0.2  =  225; mpX.0.2  = 'Needles';
  865.      mrX.0.2  = 'I-40 in California';    zm.0.2  = 1.00
  866.    mp.0.3  =  440; mpX.0.3  = 'Flagstaff';
  867.      mrX.0.3  = 'I-40 in California';    zm.0.3  = 3.65
  868.    mp.0.4  =  620; mpX.0.4  = 'Gallup';
  869.      mrX.0.4  = 'I-40 in Arizona';       zm.0.4  = 5.50
  870.    mp.0.5  =  760; mpX.0.5  = 'Albuquerque';
  871.      mrX.0.5  = 'I-40 in New Mexico';    zm.0.5  = 3.35
  872.    mp.0.6  =  930; mpX.0.6  = 'Tucumcari';
  873.      mrX.0.6  = 'I-40 in New Mexico';    zm.0.6  = 1.00
  874.    mp.0.7  = 1040; mpX.0.7  = 'Amarillo';
  875.      mrX.0.7  = 'I-40 in Texas';         zm.0.7  = 7.80
  876.    mp.0.8  = 1155; mpX.0.8  = 'Oklahoma border';
  877.      mrX.0.8  = 'I-40 in Texas';         zm.0.8  = 5.50
  878.    mp.0.9  = 1305; mpX.0.9  = 'Oklahoma City';
  879.      mrX.0.9  = 'I-40 in Oklahoma';      zm.0.9  = 2.65
  880.    mp.0.10 = 1530; mpX.0.10 = 'Missouri border';
  881.      mrX.0.10 = 'Oklahoma Turnpike';     zm.0.10 = 2.40
  882.    mp.0.11 = 1815; mpX.0.11 = 'St. Louis';
  883.      mrX.0.11 = 'I-44 in Missouri';      zm.0.11 = 0.00
  884.    mp.0.12 = 1980; mpX.0.12 = 'Terre Haute';
  885.      mrX.0.12 = 'I-70 in Illinois';      zm.0.12 = 5.50
  886.    mp.0.13 = 2050; mpX.0.13 = 'Indianapolis';
  887.      mrX.0.13 = 'I-70 in Indianna';      zm.0.13 = 0.00
  888.    mp.0.14 = 2115; mpX.0.14 = 'Ohio border';
  889.      mrX.0.14 = 'I-70 in Indianna';      zm.0.14 = 1.00
  890.    mp.0.15 = 2220; mpX.0.15 = 'Columbus';
  891.      mrX.0.15 = 'I-70 in Ohio';          zm.0.15 = 4.25
  892.    mp.0.16 = 2350; mpX.0.16 = 'Wheeling West Virginia';
  893.      mrX.0.16 = 'I-70 in Ohio';          zm.0.16 = 4.25
  894.    mp.0.17 = 2410; mpX.0.17 = 'New Stanton';
  895.      mrX.0.17 = 'I-70 in Pennsylvania';  zm.0.17 = 6.75
  896.    mp.0.18 = 2570; mpX.0.18 = 'Harrisburg';
  897.      mrX.0.18 = 'Pennsylvania Turnpike'; zm.0.18 = 3.75
  898.    mp.0.19 = 2760; mpX.0.19 = 'New Jersey border';
  899.      mrX.0.19 = 'Pennsylvania Turnpike'; zm.0.19 = 2.95
  900.    mp.0.20 = 2840; mpX.0.20 = 'Holland Tunnel';
  901.      mrX.0.20 = 'I-70 in New Jersey';    zm.0.20 = 2.40
  902.    mp.0.21 = 9999; mpX.0.21 = 'New York';
  903.      mrX.0.21 = 'New York streets';      zm.0.21 = 8.00
  904.    end
  905. else do
  906.    rt = 2
  907.    rh = 1
  908.    mt.2 = 3120
  909.    mp.2.1  =   75; mpX.2.1  = 'Palm Springs';
  910.      mrX.2.1  = 'I-10 in California';    zm.2.1  = 0.00
  911.    mp.2.2  =  225; mpX.2.2  = 'Blythe';
  912.      mrX.2.2  = 'I-10 in California';    zm.2.2  = 1.00
  913.    mp.2.3  =  375; mpX.2.3  = 'Phoenix';
  914.      mrX.2.3  = 'I-10 in Arizona';       zm.2.3  = 0.00
  915.    mp.2.4  =  495; mpX.2.4  = 'Tucson';
  916.      mrX.2.4  = 'I-10 in Arizona';       zm.2.4  = 7.90
  917.    mp.2.5  =  650; mpX.2.5  = 'Lordsburg';
  918.      mrX.2.5  = 'I-10 in Arizona';       zm.2.5  = 5.75
  919.    mp.2.6  =  795; mpX.2.6  = 'El Paso';
  920.      mrX.2.6  = 'I-10 in New Mexico';    zm.2.6  = 0.00
  921.    mp.2.7  =  965; mpX.2.7  = 'Pecos';
  922.      mrX.2.7  = 'I-10 in Texas';         zm.2.7  = 1.00
  923.    mp.2.8  = 1080; mpX.2.8  = 'Odessa';
  924.      mrX.2.8  = 'I-20 in Texas';         zm.2.8  = 0.00
  925.    mp.2.9  = 1250; mpX.2.9  = 'Abilene';
  926.      mrX.2.9  = 'I-20 in Texas';         zm.2.9  = 3.80
  927.    mp.2.10 = 1439; mpX.2.10 = 'Dallas';
  928.      mrX.2.10 = 'I-20 in Texas';         zm.2.10 = 0.00
  929.    mp.2.11 = 1610; mpX.2.11 = 'Louisiana border';
  930.      mrX.2.11 = 'I-20 in Texas';         zm.2.11 = 5.00
  931.    mp.2.12 = 1785; mpX.2.12 = 'Vicksburg';
  932.      mrX.2.12 = 'I-20 in Louisiana';     zm.2.12 = 0.00
  933.    mp.2.13 = 1965; mpX.2.13 = 'Alabama border';
  934.      mrX.2.13 = 'I-20 in Mississippi';   zm.2.13 = 1.00
  935.    mp.2.14 = 2100; mpX.2.14 = 'Birmingham';
  936.      mrX.2.14 = 'I-20 in Alabama';       zm.2.14 = 4.25
  937.    mp.2.15 = 2200; mpX.2.15 = 'Georgia border';
  938.      mrX.2.15 = 'I-20 in Alabama';       zm.2.15 = 0.00
  939.    mp.2.16 = 2255; mpX.2.16 = 'Atlanta';
  940.      mrX.2.16 = 'I-20 in Georgia';       zm.2.16 = 0.00
  941.    mp.2.17 = 2320; mpX.2.17 = 'Carolina border';
  942.      mrX.2.17 = 'I-85 in Georgia';       zm.2.17 = 5.75
  943.    mp.2.18 = 2565; mpX.2.18 = 'Greensboro';
  944.      mrX.2.18 = 'I-85 in Carolina';      zm.2.18 = 3.80
  945.    mp.2.19 = 2680; mpX.2.19 = 'Virginia border';
  946.      mrX.2.19 = 'I-85 in North Carolina';zm.2.19 = 7.85
  947.    mp.2.20 = 2775; mpX.2.20 = 'Richmond';
  948.      mrX.2.20 = 'I-85 in Virginia';      zm.2.20 = 0.00
  949.    mp.2.21 = 2880; mpX.2.21 = 'Washington D.C.';
  950.      mrX.2.21 = 'I-95 in Virginia';      zm.2.21 = 0.00
  951.    mp.2.22 = 2920; mpX.2.22 = 'Baltimore';
  952.      mrX.2.22 = 'I-95 in Maryland';      zm.2.22 = 2.30
  953.    mp.2.23 = 2990; mpX.2.23 = 'New Jersey border';
  954.      mrX.2.23 = 'I-95 in Delaware';      zm.2.23 = 2.25
  955.    mp.2.24 = 3110; mpX.2.24 = 'Holland Tunnel';
  956.      mrX.2.24 = 'New Jersey Turnpike';   zm.2.24 = 2.40
  957.    mp.2.25 = 9999; mpX.2.25 = 'New York';
  958.      mrX.2.25 = 'city streets';          zm.2.25 = 8.00
  959.    end
  960. return
  961. /* ------------------------------<End>------------------------------ */
  962. /*
  963. Subroutine to warn and handle trucker's chance to stop & rest
  964. =============================================================
  965. */
  966. pass_stop_opportunity:
  967. say 'Truck stop ahead.  Do you want to stop (Y or N)? '
  968. shsleep_sw = 0  /* switch, 1 = has rested/slept */
  969. do forever
  970.    do forever
  971.       ikeyX = getstr()
  972.       if length(ikeyX) = 1 & pos(ikeyX, 'NY') > 0 then
  973.          leave
  974.       end
  975.    if ikeyX = 'N' then do
  976.       hl = hl + 1
  977.       leave
  978.       end
  979.    t = 85 + 35 * rnd() % 1
  980.    say 'Diesel fuel costs $'t/100' per gallon.'
  981.    say '     How many gallons do you want?'
  982.    t1 = getnum()
  983.    if t1 > 0 then do
  984.       say 'Pay $'t * t1 / 100
  985.       xc = xc + t * t1 / 100
  986.       wf = wf + t1
  987.       end
  988.    say 'So far, you have spent $'xc
  989.    if wf > 200 then do
  990.       say 'Your tank only holds 200 gallons ...'
  991.       say formatsim(wf - 200, 4) 'gallons spilled !!'
  992.       wf = 200
  993.       end
  994.    if ts <= 0 then do
  995.       t = 200 + 50 * rnd() % 1
  996.       t1 = 100 + 70 * rnd() % 1
  997.       say 'A new tire costs $'t'   A retread costs $'t1
  998.       say '     Do you want to buy a tire (Y or N)?'
  999.       do forever
  1000.          ikeyX = getstr()
  1001.          if length(ikeyX) = 1 & pos(ikeyX, 'NY') > 0 then
  1002.             leave
  1003.          end
  1004.       if ikeyX = 'Y' then do
  1005.          say '     Which type do you want (N=new or R=retread)?'
  1006.          do forever
  1007.             zX = getstr()
  1008.             if length(zX) = 1 & pos(zX, 'NR') > 0 then
  1009.                leave
  1010.             end
  1011.          say '     How many (0-3)?'
  1012.          do forever
  1013.             tno = getstr()
  1014.             if length(tno) = 1 & pos(tno, '0123') > 0 then
  1015.                leave
  1016.             end
  1017.          if tno > 0 then do
  1018.             ts = tno - 1
  1019.             if zX = 'R' then do
  1020.                tc = tc - 0.5 * tno
  1021.                xc = xc + t1 * tno
  1022.                end
  1023.             else do
  1024.                tc = tc - tno
  1025.                xc = xc + t * tno
  1026.                end
  1027.             end
  1028.          end
  1029.       end
  1030.    if shsleep_sw then do
  1031.       say ' '
  1032.       leave
  1033.       end
  1034.    hr = hr + 1
  1035.    ns = 0
  1036.    say 'Do you want to get some sleep (Y or N)?'
  1037.    do forever
  1038.       ikeyX = getstr()
  1039.       if length(ikeyX) = 1 & pos(ikeyX, 'NY') > 0 then
  1040.          leave
  1041.       end
  1042.    if ikeyX = 'N' then do
  1043.       say ' '
  1044.       call report_trip_duration hr
  1045.       leave
  1046.       end
  1047.    say '     How many hours of rest?'
  1048.    t = getnum()
  1049.    if t < 1 then
  1050.       leave
  1051.    shsleep_sw = 1
  1052.    dh = hr + 7 - 24 * ((hr + 7) % 24)
  1053.    hr = hr + t
  1054.    call delay 50 * t
  1055.    if ct = 1 then do
  1056.       wf = wf - 7 * t
  1057.       if wf < 0 then do
  1058.          wf = 0
  1059.          call wait_while_load_spoiled
  1060.          end
  1061.       end
  1062.    if dh > 3 &,
  1063.       dh < 20 then do
  1064.       t = (t / 2 + 0.6) % 1
  1065.       say "Thanks to your neighbors' noise, you got only "t,
  1066.           "hours real sleep."
  1067.       call delay 200
  1068.       end
  1069.    hs = hs + t
  1070.    if t > 3 then
  1071.       hl = 0
  1072.    else
  1073.       hl = hl / 2
  1074.    shf = 5000
  1075.    shd = 100
  1076.    do 3
  1077.       interpret rxbeep
  1078.       call delay 50
  1079.       end
  1080.    shd = 350
  1081.    interpret rxbeep
  1082.    interpret rxcls
  1083.    call report_trip_duration hr
  1084.    say 'Time to hit the road again.'
  1085.    say ' '
  1086.    call check_trucker_condition
  1087.    say 'You now have 'wf % 1' gallons of fuel.'
  1088.    say 'Do you want to buy more (Y or N)?'
  1089.    end
  1090. return
  1091. /* ------------------------------<End>------------------------------ */
  1092. /*
  1093. Subroutine to calculate & report trip duration in days and hours
  1094. ================================================================
  1095. */
  1096. report_trip_duration: procedure expose dsX. dh
  1097. arg hr
  1098. dh = hr + 8
  1099. shdt = dh % 24
  1100. dh = dh - 24 * shdt
  1101. do while shdt > 6
  1102.    shdt = shdt - 7
  1103.    end
  1104. dmX = 'AM'
  1105. if dh = 12 then
  1106.    dmX = 'Noon'
  1107. else do
  1108.    if dh > 12 then do
  1109.       dh = dh - 12
  1110.       dmX = 'PM'
  1111.       end
  1112.    if dh = 0 then do
  1113.       dh = 12
  1114.       dmX = 'Midnight'
  1115.       end
  1116.    end
  1117. say ' '
  1118. say 'Day: 'dsX.shdt
  1119. say 'Time: 'formatsim(dh, 2)' 'dmX
  1120. say ' '
  1121. return
  1122. /* ------------------------------<End>------------------------------ */
  1123. /*
  1124. Subroutine which drives the game cycles
  1125. =======================================
  1126. */
  1127. ride_cross_country:
  1128. do while mp.rt.np <= mf
  1129.    call check_obstacles
  1130.    if sh_keep_on_trucking then
  1131.       nop
  1132.    else
  1133.       return
  1134.    end
  1135. say 'Cruising on 'mrX.rt.np
  1136. call check_trucker_condition
  1137. say 'You are feeling 'cdX
  1138. call check_weather
  1139. say 'Current weather: 'crX
  1140. ns = ns + 1
  1141. if ns > 3 then
  1142.    call pass_stop_opportunity
  1143. sp = 0
  1144. maxsp = (1.5 * sl) % 1
  1145. do while sp < 20 |,
  1146.          sp > maxsp
  1147.    say 'How fast do you wish to go (20-100)?'
  1148.    sp = getnum()
  1149.    sp = (sp + 0.5) % 1       /* Round it up */
  1150.    if sp < 20 then
  1151.       say 'Your have to go at least 20 --'
  1152.    if sp > maxsp then
  1153.    say 'You can only get the old rig to go 'maxsp'MPH on this road.'
  1154.    end
  1155. af = sp ** 2 * cd * cr
  1156. if af > rnd() * 10000000 then do
  1157.    do shf = 1000 to 10 by -50
  1158.       shd = shf % 10
  1159.       interpret rxbeep
  1160.       interpret rxcls
  1161.       say ' '
  1162.       say 'C R A S H !!'
  1163.       end
  1164.    say ' '
  1165.    if cd = 100 |,
  1166.       (cd = 25 & sp < 65) then
  1167.       say 'You fell asleep at the wheel.'
  1168.    else if cr = 50 then
  1169.       say 'You drove off the road into a snow filled ditch.'
  1170.    else if cr = 10 then
  1171.       say 'You rear-ended a pick-up with no tail lights.'
  1172.    else if sp > 65 then
  1173.       say '        Speed kills !'
  1174.    else if cd > 2 then do
  1175.       say 'You hit a slick spot... !@#$%^...'
  1176.       call delay 500
  1177.       say '                    ... and !@#$%^... skidded off the road.'
  1178.       end
  1179.    else
  1180.       say 'A drunk driver rammed your rig. !@#$%^... Tough luck !'
  1181.    say ' '
  1182.    call delay 350
  1183.    say 'You lose your truck & profits.'
  1184.    sh_keep_on_trucking = 0
  1185.    return
  1186.    end
  1187. tc = tc + 0.00005 * sp * wl / 40000
  1188. af = sqr(mf + 100) * tc
  1189. if af > rh * 25000 * rnd() then
  1190.    call got_flat_tire
  1191. if sp > sl - rh + 10 then do
  1192.    if (sp - sl + 2 * rh - 5) ** 2 >= 900 * rnd() then do
  1193.       call got_caught_by_police
  1194.       if sh_keep_on_trucking then
  1195.          nop
  1196.       else
  1197.          return
  1198.       end
  1199.    end
  1200. hl = hl + 1
  1201. hr = hr + 1
  1202. if sl < 40 then
  1203.    sl = 55
  1204. t = abs(55 - sp)
  1205. if t > 12 then
  1206.    t = 12.5
  1207. t1 = sp / (4.5 - 0.2 * t)
  1208. wf = wf - t1
  1209. if wf < 0 then
  1210.    call run_out_of_gas
  1211. mf = mf + sp
  1212. if mf >= mt.rt then
  1213.    call end_of_trip
  1214. if sh_keep_on_trucking then do
  1215.    call delay 25
  1216.    interpret rxcls
  1217.    call report_trip_duration hr
  1218.    say 'Approximate fuel:' ((wf - 4 + rnd() * 10) % 1)
  1219.    say 'Speed: 'sp
  1220.    say 'Odometer: 'mf
  1221.    say 'Miles to go: 'mt.rt - mf
  1222.    say ' '
  1223.    end
  1224. return
  1225. /* ------------------------------<End>------------------------------ */
  1226. /*
  1227. Function to generate and return a random number
  1228. between/with 0.0000 & 1.0000
  1229. =============================================
  1230. */
  1231. rnd: procedure
  1232. seed = time('E')
  1233. seed = time('S') + (seed - seed % 1) * 1000000
  1234. return random(0, 10000, seed) / 10000
  1235. /* ------------------------------<End>------------------------------ */
  1236. /*
  1237. Subroutine to handle one of the annoying problems the trucker could
  1238. easily have avoided..., NO FUEL
  1239. ===================================================================
  1240. */
  1241. run_out_of_gas:
  1242. t1 = t1 + wf
  1243. wf = 0
  1244. sp = 0
  1245. t = (4.5 - 0.2 * t) * t1
  1246. mf = mf + (t % 1)
  1247. say 'After' formatsim(t, 4),
  1248.     'more miles, you ran out of fuel   (DUMMY !!)'
  1249. call wait_for_gas
  1250. return
  1251. /* ------------------------------<End>------------------------------ */
  1252. /*
  1253. Subroutine to show the game title
  1254. =================================
  1255. */
  1256. showtitl: procedure
  1257. sh.1 =,
  1258. 'TTTTTTTTT RRRRRRR   UUU   UUU   CCCCCC  KKK   KKK EEEEEEEEE RRRRRRR'
  1259. sh.2 =,
  1260. '   TTT    RRR  RRR  UUU   UUU  CCC  CCC KKK  KKK  EEE       RRR  RRR'
  1261. sh.3 =,
  1262. '   TTT    RRR   RRR UUU   UUU CCC       KKK KKK   EEE       RRR   RRR'
  1263. sh.4 =,
  1264. '   TTT    RRR  RRR  UUU   UUU CCC       KKKKKK    EEE       RRR  RRR'
  1265. sh.5 =,
  1266. '   TTT    RRRRRRR   UUU   UUU CCC       KKKKK     EEEEE     RRRRRRR'
  1267. sh.6 =,
  1268. '   TTT    RRRRRR    UUU   UUU CCC       KKKKKK    EEE       RRRRRR'
  1269. sh.7 =,
  1270. '   TTT    RRR RRR   UUU   UUU CCC       KKK KKK   EEE       RRR RRR'
  1271. sh.8 =,
  1272. '   TTT    RRR  RRR  UUU   UUU  CCC  CCC KKK  KKK  EEE       RRR  RRR'
  1273. sh.9 =,
  1274. '   TTT    RRR   RRR  UUUUUUU    CCCCCC  KKK   KKK EEEEEEEEE RRR   RRR'
  1275. say ' '
  1276. do shi = 1 to 9
  1277.    say '     'sh.shi
  1278.    say '     'sh.shi
  1279.    end
  1280. say ' '
  1281. drop sh.
  1282. return
  1283. /* ------------------------------<End>------------------------------ */
  1284. /*
  1285. Function to return the SQUARE ROOT of the argument X.
  1286. =====================================================
  1287. According to Newton-Raphson algorithm
  1288. */
  1289. sqr: procedure
  1290. arg x
  1291. arg = abs(x)
  1292. root = arg / 2
  1293. if root > 0 then do digits()
  1294.    root = (root + arg / root) / 2
  1295.    if abs(root ** 2 - arg) / arg - 0.000001 <= 0 then
  1296.       leave
  1297.    end
  1298. return root
  1299. /* ------------------------------<End>------------------------------ */
  1300. /*
  1301. Subroutine to show a 'moving truck' under OS/2 2.x PL/2 REXX
  1302. ============================================================
  1303. */
  1304. truckos2: procedure
  1305. sht1 = ' TRUCKER_OO=.'
  1306. sht2 = " -()-----()='"
  1307. shtx = center('Press Enter to start the game...', 79)
  1308.  
  1309. call syscurstate 'OFF'  /* temporarily hide the cursor */
  1310. do i = 2 to 79
  1311.    if i > 67 & i < 79 then do
  1312.       shil = 79 - i
  1313.       sht1 = left(sht1, shil)
  1314.       sht2 = left(sht2, shil)
  1315.       end
  1316.    call syscurpos 19, i
  1317.    say sht1
  1318.    call syscurpos 20, i
  1319.    say sht2
  1320.    call syscurpos 20, 2
  1321.    say left(shtx, i)
  1322.    end
  1323. call syscurstate 'ON'
  1324. return
  1325. /* ------------------------------<End>------------------------------ */
  1326. /*
  1327. Subroutine to show a 'moving truck' under Quercus Personal/REXX
  1328. ===============================================================
  1329. */
  1330. truckper: procedure
  1331. sht1 = ' TRUCKER_OO=.'
  1332. sht2 = " -()-----()='"
  1333. shtx = center('Press Enter to start the game...', 79)
  1334.  
  1335. do i = 2 to 79
  1336.    if i > 67 & i < 79 then do
  1337.       shil = 79 - i
  1338.       sht1 = left(sht1, shil)
  1339.       sht2 = left(sht2, shil)
  1340.       end
  1341.    call cursor 20, i
  1342.    say sht1
  1343.    call cursor 21, i
  1344.    say sht2
  1345.    call cursor 21, 2
  1346.    say left(shtx, i)
  1347.    end
  1348. return
  1349. /* ------------------------------<End>------------------------------ */
  1350. /*
  1351. Subroutine to show a 'moving truck' under Kilowatt Software
  1352. Portable/REXX
  1353. ===========================================================
  1354. */
  1355. truckpor: procedure
  1356. sht1 = ' TRUCKER_OO=.'
  1357. sht2 = " -()-----()='"
  1358. shtx = center('Press Enter to start the game...', 79)
  1359.  
  1360. do i = 2 to 79
  1361.    if i > 67 & i < 79 then do
  1362.       shil = 79 - i
  1363.       sht1 = left(sht1, shil)
  1364.       sht2 = left(sht2, shil)
  1365.       end
  1366.    call cursor 20, i
  1367.    say sht1
  1368.    call cursor 21, i
  1369.    say sht2
  1370.    call cursor 21, 2
  1371.    if i < 78 then  /* to avoid a line overflow, bug(?) in ver.1.10 - */
  1372.       say left(shtx, i)
  1373.    end
  1374. return
  1375. /* ------------------------------<End>------------------------------ */
  1376. /*
  1377. Subroutine to handle delivery of gas
  1378. ====================================
  1379. */
  1380. wait_for_gas:
  1381. say '     It cost $200 to get a barrel of diesel delivered.'
  1382. wf = 55
  1383. t1 = 1 + (rnd() * 5) % 1
  1384. xc = xc + 200
  1385. hl = hl + t1
  1386. hr = hr + t1
  1387. say '          You also wasted 't1' hours by your carelessness.'
  1388. call wait_while_load_spoiled
  1389. return
  1390. /* ------------------------------<End>------------------------------ */
  1391. /*
  1392. Subroutine to determine the condition of the oranges (load type 1)
  1393. while the trucker is not riding due to obstacles
  1394. ==================================================================
  1395. */
  1396. wait_while_load_spoiled: procedure expose ct cx
  1397. if ct = 1 then do
  1398.    cx = cx + (rnd() * 3) % 1
  1399.    say '     Sitting with the refer unit off is damaging the oranges.'
  1400.    end
  1401. call delay 1000
  1402. return
  1403. /* ------------------------------<End>------------------------------ */
  1404. /* --------------------------------------------------------------------
  1405. NOTES:
  1406. ======
  1407. Descriptions of important variables in 'TRUCKER'
  1408. ------------------------------------------------
  1409. af    = all (reusable) failure code
  1410. cd    = code of condition/mood of the trucker (1:good, ..., 100:worst)
  1411. cdX   = condition/mood of the trucker
  1412. cr    = condition of the weather code (1:good, ..., 50:worst)
  1413. crX   = condition of the weather
  1414. ct    = cargo type (1, 2 or 3)
  1415. cx    = condition of the load (okay if smaller than 1)
  1416. dh    = day hour (time in day)
  1417. dsX   = day script (day in word)
  1418. hl    = hours labored (hours continuously worked)
  1419. hr    = hours ridden (total elapse time away from LA)
  1420. hs    = hours slept (total)
  1421. hsw1  = help switch
  1422. ikeyX = input character string
  1423. intzh = integer(zh)
  1424. maxsp = maximum speed the truck can handle
  1425. mf    = miles covered
  1426. mp    = milestone place number (where the truck is)
  1427. mpX   = milestone place name (city/town at mp)
  1428. mrX   = milestone road name (highway/street name at mp)
  1429. mt    = mile total between LA and NY for the chosen route
  1430. np    = number of place (milestone number)
  1431. ns    = number of stations passed after last stop
  1432. nt    = number of traffic violations
  1433. ntX   = number of traffic violations in word
  1434. rh    = road quality (1 = better, 4 = worst)
  1435. rt    = route (1 = North, 0 = Middle, 2 = South)
  1436. rx..  = variables with REXX system specific commands to be interpreted
  1437. sh..  = Simon Husin's work, temporary and reusable variables
  1438. sl    = speed limit imposed
  1439. sp    = speed
  1440. t..   = temporary and reusable variables
  1441. tc    = tire condition (0 = best, 10 = okay, etc.)
  1442. tno   = number of tires purchased
  1443. ts    = tire spared
  1444. wf    = work fuel (estimate volume of fuel available in tank)
  1445. wl    = work load (total pounds of load)
  1446. xc    = trip expenses
  1447. xt    = trip final financial result
  1448. zh    = same as zm
  1449. zm    = standard hindrance factor at milestone mp
  1450. zx    = tire type (N=new or R=retread)
  1451.  
  1452.  
  1453. Compatibility Issues:
  1454. ---------------------
  1455. 1. This program is using IF THEN NOP ELSE ...  and  (x < y | x > y)
  1456.    constructions rather than \ or \= to make it run under ARexx which is
  1457.    using tilde (~) as the NOT sign.
  1458.  
  1459.    Solutions applied to complement ARexx shortcomings:
  1460.    - FORMATSIM(...) instead of FORMAT(...)
  1461.    - LENGTH(...) = 1 & POS(...) instead of WORDPOS(...)
  1462.    - A 80-character title has been replaced with two short title lines
  1463.      to avoid the line to wrap around on the output window
  1464.  
  1465.    Solutions applied to complement REXX/Windows shortcomings:
  1466.    - Parse Source has been moved to the main program to avoid problems
  1467.      with REXX/Windows running with the Intel 386(-compatible) processor
  1468.  
  1469.    Solutions applied to complement ARexx and uni-REXX shortcomings:
  1470.    - Exponential notation (e.g. 1E4, 1E-6, etc.) has been replaced with
  1471.      conventional notation (e.g. 10000, 0.000001, etc.)
  1472.  
  1473. 2. IBM Mainframe users:
  1474.    This program will run without any changes in your environment.  You
  1475.    might want to check first whether the character '|' gets converted
  1476.    correctly (to a whole vertical bar) or to a broken vertical bar.  In
  1477.    the latter case, replace all broken bars with whole ones, then... hit
  1478.    the road!
  1479.  
  1480.    Just in case you don't know:
  1481.    The MVS/TSO or VM/CMS implementation of REXX supports the millionth
  1482.    of a second (1E-6) in the E and L options of the TIME function.
  1483.  
  1484. 3. PC users:
  1485.    a) Personal REXX:
  1486.    This program has been tested with Quercus Systems Personal REXX under
  1487.    DOS, Windows and OS/2 (16-bit and 32-bit) without any problems.
  1488.  
  1489.    In DOS environment:
  1490.    -  first create the object code with /O/NM option
  1491.    -  due to the QUEUE instruction, needed to accomodate REXX/Windows'
  1492.       shortcomings, you must first run RXINTMGR and STACKMGR before
  1493.       executing this program
  1494.  
  1495.    DELAY(n) and REXXLIB functions COS(n) and SQRT(n) are not used to
  1496.    simplify this program's portability.
  1497.  
  1498.    b) Portable/REXX:
  1499.    Built-in functions COS(n), DELAY(n) and SQRT(n) are not used to
  1500.    simplify this program's portability.
  1501.  
  1502.    Although the components, tested separately do work, this entire
  1503.    program has been tested with Portable/REXX Versions 1.10 and 1.30
  1504.    without any success (system resources exhausted).
  1505.  
  1506.    c) REXX/Windows:
  1507.    This program will run without any changes in REXX/Windows.
  1508.  
  1509.    The shortcomings in the interpreter mentioned in point number 1 were
  1510.    detected only on 386-based computers caused by the PARSE SOURCE on
  1511.    line 189 which resides within a subroutine.  The interpreter has
  1512.    since been fixed.
  1513.  
  1514.    d) Tritus SPF
  1515.    Tritus allows only 32000-byte or smaller REXX programs to be run via
  1516.    its REXX primary command.  Yet, experiments with stripped down
  1517.    TRUCKER in REXX did not produce satisfying results.
  1518.  
  1519.    Under DOS (TSPF):
  1520.    The program has been tested with TSPF 1.2 Demo, REXX version 1.66
  1521.    dated 18 Feb 1992 without any success (system resources exhausted).
  1522.  
  1523.    Under OS/2 (TSPF2):
  1524.    Tritus is using IBM's PL 2/REXX under OS/2.  All experiments
  1525.    caused the task to hang and could be only released during system
  1526.    reset or boot up.
  1527.  
  1528.    e) OS/2 Procedures Language/2 REXX:
  1529.    Built-in function SysSleep(n), and functions SQRT(n) and COS(n)
  1530.    supported by RXMATHFN library are not used to simplify this program's
  1531.    portability.
  1532.  
  1533.    OS/2 2.x REXX Utility 'SYSCLS' is not used despite the fact that it
  1534.    is a bit faster and 'cleaner' than the OS/2 command clear screen
  1535.    (CLS) because the latter maintains the screen colors better than the
  1536.    first.
  1537.  
  1538.    Although PULL is supported by OS/2, earlier versions (before 2.0)
  1539.    have one difference with the same command in other interpreters,
  1540.    i.e. it shows a blank line with '?' followed by the actual prompt
  1541.    on the next line.
  1542.  
  1543. 4. Unix/AIX users:
  1544.    This program will run without any changes in uni-REXX.
  1545.  
  1546.    The shortcomings in the interpreter mentioned in point number 1 were
  1547.    detected by The Workstation Group.  The interpreter has since been
  1548.    fixed.
  1549.  
  1550. 5. The use of interpret command slows down the execution of the
  1551.    program, yet it is used to ensure and ease compatibility accross
  1552.    platforms.
  1553.  
  1554. 6. TRUCKxxx subroutines have been created for those (xxx) interpreters
  1555.    which support cursor positioning on the screen.  This approach was
  1556.    chosen, instead of the INTERPRET instruction executing the cursor
  1557.    positioning function, to achieve the maximum speed of the 'animation'
  1558.    of the 'truck' on the screen.
  1559.  
  1560.    The same can be created for the mainframe computers equipped with a
  1561.    Dialog Manager (ISPF/VM), by creating a panel member.
  1562.  
  1563. 6. LINEIN(CON) is a function that is supported only by OS/2, Personal
  1564.    REXX and Portable/REXX interpreters.
  1565.    It is comparable with the PARSE PULL command in that the entered
  1566.    alphabetical characters are NOT translated into uppercase.
  1567.  
  1568.  
  1569. Known REXX Interpreters/Compiler/Extensions:
  1570. --------------------------------------------
  1571. CDB Software, Inc. (1-800-627-6561):
  1572.     o  CDB/REXX, The DB2 and REXX Integrator
  1573. Failure Analysis Associates, Inc. (1-800-322-2136):
  1574.     o  FaAA_LSIE/VM Library of System Interpreter Extensions for REXX/VM
  1575.        among others, to access tape and VSAM files
  1576. Goal Systems International, Inc. (1-614-888-1775):
  1577.     o  OPS/MVS 2.2 with Goal REXX interpreter/compiler
  1578. IBM Corporation (1-800-IBM-CALL):
  1579.     o  Compiler and Library for REXX/370 for both CMS and MVS/ESA
  1580.     o  MVS - TSO/E REXX
  1581.     o  Procedures Language REXX/2 for OS/2 w/ easy (SQL) access to the
  1582.        OS/2 ES Database Manager (DBM, DB2/2) (1-800-3IBM-OS2 buy OS/2)
  1583.     o  REXXEA, OS/2 Extended Attribute functions
  1584.        (REXXEA.ZIP-IBM NSC BBS)
  1585.     o  RXMATHFN, Math functions (RXMATH.ZIP - IBM NSC BBS)
  1586.     o  VM/CMS REXX/370 VM
  1587.     o  VREXX, Visual REXX Extension (VREXX2.ZIP - IBM NSC BBS)
  1588. Kilowatt Software (1-800-848-9474 or 1-614-866-4300):
  1589.     o  Portable/REXX for DOS version 1.10i
  1590.     o  REXX/Windows for DOS/MS-Windows 3.x
  1591.     o  REXX4NT for MS-Windows NT (literature: available in March 1993)
  1592. Open Software Technologies, Inc. (1-407-834-2822):
  1593.     o  REXX/NET & REXX/TSO for DB2 Application Development
  1594.     o  REXXTOOLS/MVS Compiler (w/ VSAM files access)
  1595. Quercus Systems (1-408-867-REXX):
  1596.     o  Personal REXX for DOS version 3.0
  1597.     o  Personal REXX for MS-Windows 3.x version 3.0
  1598.     o  Personal REXX for OS/2 version 2.0 (16-bit)
  1599.     o  Personal REXX for OS/2 version 3.0 (32-bit)
  1600.        The fastest REXX interpreter for OS/2 (per February of 1993)
  1601.     o  REXXLIB - OS/2 REXX Extensions with useful and powerful functions
  1602.        and commands
  1603. Relational Architects International, Inc.
  1604.        (1-800-776-0771 or 1-201-420-0400)
  1605.     o  AcceleREXX - REXX compiler, an alternative to the IBM's REXX/370
  1606.     o  RLX/Compile - Static SQL support for RLX/REXX
  1607.     o  RLX/ISPF - Allows SQL queried tables scrolled in ISPF tables
  1608.     o  RLX/MVS - An address space independent implementation of RLX/REXX
  1609.     o  RLX/NET - REXX SQL for NetView
  1610.     o  RLX/REXX - SQL-embedded REXX to access DB2 database
  1611.        (RLX = Relational Language Executive)
  1612. Ruddock and Associates, Inc. (1-416-340-0887)
  1613.     o  REXXTACY 2.0 (OS/2, DOS, MS C 6 & 7 compatible - Beta Rev. 1.6)
  1614.        REXX to C program source code converter
  1615. Sidney (1-214-750-8112):
  1616.     o  PACKIO (packed file manipulation routine)
  1617.     o  PDSIO (various PDS file/members access routines)
  1618.     o  Rexx Function Library (sort, field-packing, etc.)
  1619.     o  Rexx-Protect (program scrambler/compressor)
  1620.     o  Rexx-Protect MVS
  1621.     o  VSAMIO (for VSAM file access)
  1622. The Workstation Group - wrk/grp (1-800-228-0255 or 1-708-696-4800):
  1623.     o  uni-REXX for Sun SPARCstation, Sun-3, Sun-4, Sun-386i, HP9000,
  1624.        Apollo, IBM RS/6000, RT/PC, AIX/370, Amdahl UTS, Cray,
  1625.        DECstation, Silicon Graphics, NeXt, SCO/Unix, etc.
  1626. Tritus, Inc. (1-800-321-2100 or 1-512-794-5800):
  1627.     o  Tritus SPF for DOS (TSPF) includes a subset of REXX interpreter
  1628.        called REXX/PC
  1629. William S. Hawes (1-617-568-8695):
  1630.     o  ARexx (pronounce: AY-REX) - REXX implementation for the
  1631.        Commodore's Amiga computers
  1632.        Included with the Operating System version 2.0 and later
  1633.  
  1634.  
  1635. Known Packages which include REXX macros and/or interface with REXX:
  1636. --------------------------------------------------------------------
  1637. ASDG, Inc. (1-608-273-6585):
  1638.     o  Art Department Professional (ADPro) - A graphics software (Amiga)
  1639. Borland International, Inc. (1-800-331-0877 or 1-800-461-3327 ->Canada)
  1640.     o  Object Vision 2.0 for OS/2 - Easy-to-use application development
  1641.        tool
  1642. Command Technology Corporation (1-800-336-3320 or 1-415-521-5900):
  1643.     o  SPF/2 for OS/2 - ISPF for the PCs
  1644. Commodore - Amiga, Inc.
  1645.     o  AmigaVision - Program builder using GUI (Amiga)
  1646. Geodesic Publications (1-404-822-0566):
  1647.     o  IllumiLink - Remote control device controler (Amiga)
  1648. Gold Disk, Inc. (1-416-602-4000):
  1649.     o  Home Office Advantage - Spreadsheet 'calculator' (Amiga)
  1650.     o  HyperBook - Hypermedia organizer (Amiga)
  1651.     o  ShowMaker - Presentation manager (Amiga)
  1652. Gramma Software (1-206-363-6417):
  1653.     o  FreD Speed-Dialer - A telephone number database manager (Amiga)
  1654. IBM Corporation (1-800-IBM-CALL):
  1655.     o  IBM SAA AD/Cycle Prolog for OS/2
  1656.     o  ISPF Dialog Manager - Full & Windowed screen manipulation tool
  1657.        for 3270- & 3290-compatible display terminals under MVS/TSO
  1658.     o  ISPF/PDF Edit - TSO Full-screen text editor
  1659.     o  MVS Database2 (DB2) Query Management Facility (QMF)
  1660.     o  OS/2 EE, ES Communication Manager (CM)
  1661.     o  OS/2 EE, ES Database Manager (DBM)
  1662.     o  OS/2 EE, ES Query Manager (QM)
  1663.     o  VM Dialog Manager - Full & Windowed screen manipulation tool
  1664.        for 3270- & 3290-compatible display terminals under VM/CMS
  1665.     o  XEdit - VM/CMS Full-screen text editor
  1666. Inovatronics, Inc. (1-214-340-4991):
  1667.     o  CanDo - Amiga applications generator
  1668.     o  C.A.P.E. - Assembler programming environment (Amiga)
  1669. Mansfield Software Group, Inc. (1-203-429-8402):
  1670.     o  KEdit for DOS and OS/2 - XEdit for the PCs
  1671. New Horizons Software, Inc. (1-512-328-6650):
  1672.     o  ProWrite - Wordprocessor (Amiga)
  1673. NewTek, Inc. (1-800-843-8934):
  1674.     o  Digi-Paint 3 - An image processing package (Amiga)
  1675. Oxxi (1-213-427-1227):
  1676.     o  A-Talk III - A telecommunication software (Amiga)
  1677. Precision Software (1-800-562-9909):
  1678.     o  SuperBase Professional 4 - A RDBMS for Amiga computers
  1679.     o  SuperPlan - Spreadsheet 'calculator' (Amiga)
  1680. Progressive Peripherals and Software (1-303-825-4144):
  1681.     o  Baud Bandit - A telecommunication software (Amiga)
  1682.     o  IntroCAD Plus - A drawing package (Amiga)
  1683. Quercus Systems (1-408-867-REXX):
  1684.     o  REXXTERM for DOS and OS/2 - A ProComm-like telecommunication
  1685.        package
  1686. Softwood, Inc. (1-602-431-9151):
  1687.     o  Electric Thesaurus (Amiga)
  1688. Teregrine Systems (1-619-431-2400):
  1689.     o  HyperStation - Data-entry emulator for mainframe on-line
  1690.        (e.g. CICS) program testings
  1691. The Workstation Group - wrk/grp (1-800-228-0255 or 1-708-696-4800):
  1692.     o  uni-SPF - ISPF for Unix/AIX-based computers
  1693.     o  uni-XEdit - XEdit for Unix/AIX-based computers
  1694. Tritus, Inc. (1-800-321-2100 or 1-512-794-5800):
  1695.     o  Tritus SPF for DOS and OS/2 - ISPF for the PCs
  1696.        ISPF Dialog Manager-compatibility features will be included in
  1697.        the late 1993 release
  1698.  
  1699.  
  1700. Periodical, new, and/or additional REXX information can be found in:
  1701. --------------------------------------------------------------------
  1702. Enterprise Systems Journal: 1-214-343-3717
  1703. IBM BBS (Canada)            1-416-946-4255 (Toronto)
  1704.                             1-514-938-3022 (Montreal)
  1705.                             1-604-664-6466 (Vancouver)
  1706. IBM NSC BBS:                1-404-835-6600
  1707. IBM OS/2 Developer:         IBM OS/2 Developer
  1708.                             P.O. Box 1079
  1709.                             Skokie, IL 60076-8079
  1710.                             1-800-WANT-OS2  (or 1-708-647-5960)
  1711.  
  1712.                             The OS/2 User Group  (outside the U.S.)
  1713.                             Barton House
  1714.                             Cirencester, Gloucestershire
  1715.                             GL7 2EE, U.K.
  1716.                             1-0285-641-175
  1717. IBM Personal Systems Technical Solutions (Form number GBOF-1229):
  1718.                             IBM Corporation
  1719.                             Internal ZIP 40-A2-04
  1720.                             One East Kirkwoord Blvd.
  1721.                             Roanoke, TX  76299-0015
  1722. IBM REXX-related materials: 1-800-IBM-CALL
  1723.                             1-800-465-1234 (Canada)
  1724. International OS/2 Users Group (Europe)
  1725.                             44-0454-633-197
  1726.                             44-0454-633-420
  1727. OS/2 Monthly:               1-800-365-2642
  1728. Quercus Systems BBS:        1-408-867-7488
  1729.  
  1730.  
  1731. Thanks:
  1732. -------
  1733. I would like to thank the following people for helping me create this
  1734. program:
  1735.  
  1736. -  Mr. Cooper, Kerry      (Nybbles & Bytes, Tacoma, WA - Amiga Dealer)
  1737. -  Mr. Daney, Charles     (Quercus Systems)
  1738. -  Mr. Glantzberg, Hughes (Himself)
  1739. -  Mr. Kenney, Barry      (Blue Cross of Washington and Alaska)
  1740. -  Mr. Slayton, Bill      (Blue Cross of Washington and Alaska)
  1741. -  Mr. Spire, Ed          (The Workstation Group)
  1742. -  Ms. Taylor, Pam        (The Workstation Group)
  1743. -  Mr. Watts, Keith       (Kilowatt Software)
  1744.  
  1745.  
  1746. About Simon Rudy Selamat HUSIN (also known as Ho Wie Lok or "Oky"):
  1747. -------------------------------------------------------------------
  1748. Simon has a degree in "Informatika" (Information Science) from the
  1749. SIVEHO College in Antwerp, Belgium (1979 graduate).  He has been working
  1750. in The Netherlands, Belgium, The United Kingdom, USA and Indonesia as an
  1751. MIS representative/ consultant ever since.  Companies he has consulted
  1752. include Shell (Oil) BV, Fokker BV, MCI Telecommunications, US Department
  1753. Of State, Bank Rakyat Indonesia, European Office of the Indonesian Tin
  1754. Mining Company (EOMIN), etc.  He has been using REXX since 1984 under
  1755. the following platforms: VM/CMS, PC/DOS, MVS/TSO, OS/2, and DOS/Windows.
  1756.  
  1757. He is currently working as a Software Re-engineer Consultant for various
  1758. companies advising and developing systems, mostly for prototypings,
  1759. tools integrations, systems optimization, and rapid & mass systems (re-)
  1760. engineering.
  1761.  
  1762. His forth-coming package "MyFiles" will utilize IBM's Visual REXX and
  1763. interface (using direct SQL access) with OS/2 ES Database Manager (DBM
  1764. and DB2/2).
  1765.  
  1766. For comments, tech-exchange, and/or more information, please send your
  1767. letter to:
  1768.                        Global Automation Company
  1769.                      325  S. Washington Ave.  #94
  1770.                             Kent,  WA 98032
  1771.                                 U.S.A.
  1772. -------------------------------------------------------------------- */
  1773.